/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ats.ereg.model.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Ali
 */
@Embeddable
public class TstStdCoursesPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "std_id")
    private int stdId;
    @Basic(optional = false)
    @Column(name = "crs_id")
    private int crsId;
    @Basic(optional = false)
    @Column(name = "semester_id")
    private int semesterId;

    public TstStdCoursesPK() {
    }

    public TstStdCoursesPK(int stdId, int crsId, int semesterId) {
        this.stdId = stdId;
        this.crsId = crsId;
        this.semesterId = semesterId;
    }

    public int getStdId() {
        return stdId;
    }

    public void setStdId(int stdId) {
        this.stdId = stdId;
    }

    public int getCrsId() {
        return crsId;
    }

    public void setCrsId(int crsId) {
        this.crsId = crsId;
    }

    public int getSemesterId() {
        return semesterId;
    }

    public void setSemesterId(int semesterId) {
        this.semesterId = semesterId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) stdId;
        hash += (int) crsId;
        hash += (int) semesterId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TstStdCoursesPK)) {
            return false;
        }
        TstStdCoursesPK other = (TstStdCoursesPK) object;
        if (this.stdId != other.stdId) {
            return false;
        }
        if (this.crsId != other.crsId) {
            return false;
        }
        if (this.semesterId != other.semesterId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ats.ereg.model.entities.TstStdCoursesPK[ stdId=" + stdId + ", crsId=" + crsId + ", semesterId=" + semesterId + " ]";
    }
    
}
